package com.lsl.decorator.decorator2.condiment;

import com.lsl.decorator.decorator2.burger.Hamburger;

/**
 * 生菜（装饰者的第一层）
 *
 * @author liusl104
 */
public class Lettuce extends Condiment {
    private Hamburger hamburger;

    public Lettuce(Hamburger hamburger) {
        this.hamburger = hamburger;
    }

    @Override
    public String getName() {
        return hamburger.getName() + "加生菜";
    }

    @Override
    public double getPrice() {
        return hamburger.getPrice() + 1.5;
    }
}
